package com.akkainaction.remote.createremoteactor.byconf;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.typesafe.config.ConfigFactory;

/**
 * 通过 配置文件部署远程actor
 */
public class Main {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys", ConfigFactory.load("remote-client.conf"));
        ActorRef clientActor = system.actorOf(Props.create(UserClientActor.class), "userClientActor");
        ActorRef userServerActor = system.actorOf(Props.create(UserServerActor.class), "userServerActor");
        userServerActor.tell("hello user server",clientActor);
    }
}
